﻿using System;

namespace Innovative.ProXr
{
	/// <summary>
	/// 
	/// </summary>
	public class WordParameterConverter : IParameterConverter<short>
	{
		RelayByte[] IParameterConverter<short>.Convert(short parameter)
		{
			RelayByte[] returnValue = new RelayByte[2];

			byte[] data = BitConverter.GetBytes(parameter);
			int word = data[0] + (256 * data[1]);

			returnValue[1] = data[0];
			returnValue[0] = data[1];

			return returnValue;
		}
	}
}
